package RLK_SQLOBJ;

import java.sql.Connection;
import java.sql.PreparedStatement;
import java.sql.SQLException;

public class Example {
    public void cleanUp(Connection con, int... ids) throws SQLException {
        PreparedStatement statement = con.prepareStatement("delete from entity where id=?"); // Resource allocated
        for (int id : ids) {
            statement.setInt(1, id);
            statement.executeUpdate();
        }
    }
}
